﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE></title>
<LINK href="images/newstyle.css"  type=text/css rel=stylesheet />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="https://www.google.com/jsapi"></script>     
<script type="text/javascript">   
		var entries;     
		var mp3links=[];  
		 
		google.load("feeds", "1"); 
		function initialize() {       
			var feed = new google.feeds.Feed("http://www.voanews.com/templates/Articles.rss?sectionPath=/learningenglish/home");   
			feed.includeHistoricalEntries();
			feed.setNumEntries(10);   
			feed.load(function(result) {         
				if (!result.error) { 
					document.getElementById("splash_screen").style.display = "none";
					document.getElementById("article_list").style.display = "block";
					          
					entries = result.feed.entries;
					var container = document.getElementById("article_list");           
					for (var i = 0; i < result.feed.entries.length; i++) {             
						entry = result.feed.entries[i];  
						var html = '';
						var pdate = new Date(entry.publishedDate);
						mp3links[i] = entry.content.match(/http:\/\/www.voanews.com\S*Mp3/i);
						var picture;
						try {
							picture = entry.mediaGroups[0].contents[0].url;
						}catch(e){
							picture = "'images//voa.png'";
						}
						
				
													           
						var item = document.createElement("UL"); 
						//html += "<LI class=date>" + pdate.toLocaleDateString() +" </LI>	<LI class=title> <a onclick=showcontent("+ i +") href=#> " +	entry.title + "</a><LI class=download><a href=\"" + mp3links[i] + "\">mp3 </a></LI>	<LI class=script><a onclick=showcontent("+ i +") href=#> 原文</a></LI>" ;
					  html += "<LI><div class=image><img width=80 height=50 src=" + picture + "/></div><div class=descript><a onclick=showcontent("+ i +") href=#><b> " +	entry.title + "</b></a><br/><span class=gray>" + pdate.toLocaleDateString() + "</span><br/>" + entry.contentSnippet +"</div></LI><div class=dashline />";
					  
					  
					  	
						item.innerHTML = html;
						       
						container.appendChild(item); 
										          
						}         
					}       
				});     
			}
		google.setOnLoadCallback(initialize);      
 
	function showcontent(id){
		var article_list=document.getElementById("article_list");
		var article_content=document.getElementById("article_content");
		article_list.style.display = "none";
		article_content.style.display = "block";	
		
		
		var cont=document.getElementById("content");
		var mp3playerstring = '<object type="application/x-shockwave-flash" data="dewplayer-vol.swf" width="240" height="20" id="dewplayer-vol" name="dewplayer-vol"><param name="wmode" value="transparent" /><param name="movie" value="dewplayer-vol.swf" /><param name="flashvars" value="mp3=' + mp3links[id]+ '&amp;showtime=1" /></object>';
		
		cont.innerHTML = "<b>"+entries[id].title + "</b><br/>"+ mp3playerstring + entries[id].content;
}

	function backtolist(){
		var list=document.getElementById("article_list");
		var content=document.getElementById("article_content");
		
		list.style.display = "block";
		content.style.display = "none";
}

</script>



</HEAD>

<body>
	
<DIV id=wrap>
	

<DIV class=banner id=header>
<DIV class=l><img src="images/voa1.png"/></DIV>
<DIV class=r><br/><img src="images/voa2.png"/></DIV>

</DIV><!--end of banner-->

<div class=line></div>

<div class="banner m" id=splash_screen >
	<DIV class=banner style="padding:5px" >正在获取最新VOA Special English文章列表...</div>
	<img style="padding:130px 250px 150px 250px" src="images/wait.gif" /><br/>
	
	
</div>
	
<DIV class=banner id=article_list style="display:none">
<div class=banner>最新获取的VOA Special English News 列表：</div>


</DIV> <!-- end of article_list-->


<div class=banner id=article_content style="display:none">
	<DIV class=banner style="padding:8px"><a onclick=backtolist() href=#><<返回列表</a></div>
	<div class=banner id=content></div>
	<DIV class=banner style="padding:8px"><a onclick=backtolist() href=#><<返回列表</a></div>

</div> <!-- end of article_content-->



<div class=banner style="display:none"> 坚持听写100天！ </DIV>

</DIV><!-- end of wraper--->

</BODY>
</HTML>